<template>
  <div class="home">
    <el-container>
      <el-header>
        <el-menu class="el-menu-demo" mode="horizontal">
          <el-menu-item index="1">处理中心</el-menu-item>
          <el-menu-item index="2">消息中心</el-menu-item>
        </el-menu>
      </el-header>
      <el-container>
        <el-aside width="200px">
           <el-menu
           default-active="/"
           class="el-menu-vertical-demo"
           :router="true">
             <el-menu-item index="/" to="/">
               <i class="el-icon-menu"></i>
               <span slot="title">学员管理</span>
             </el-menu-item>
             <el-menu-item index="/teacher" to="/teacher">
               <i class="el-icon-document"></i>
               <span slot="title">讲师管理</span>
             </el-menu-item>
             <el-menu-item index="3">
               <i class="el-icon-setting"></i>
               <span slot="title">助教管理</span>
             </el-menu-item>
            </el-menu>
        </el-aside>
        <el-main>
          <router-view/>
        </el-main>
     </el-container>
    </el-container>
  </div>
</template>

<script>
// @ is an alias to /src


export default {
  name: 'Home',
  components: {
    
  },
  methods:{
    onSelect(index){
      window.console.log(index)
      if(index===1){
        this.$router.push("/")
      }else{
        this.$router.push("/teacher")
      }
    }
  }
}
</script>

<style scoped>
 .el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    /* line-height: 160px; */
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }

  .el-menu-demo
  {
    background-color: lightblue;
  }
</style>
